package com.xpertline.ui.room;

import java.awt.EventQueue;

import javax.swing.JDialog;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.JButton;
import java.awt.FlowLayout;
import javax.swing.JLabel;
import java.awt.Component;
import javax.swing.Box;
import java.awt.Dimension;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JScrollPane;

public class EditRoomDialog extends JDialog {
	private JTextField textField;
	private JTextField textField_1;
	private JTable table;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					EditRoomDialog dialog = new EditRoomDialog();
					dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
					dialog.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the dialog.
	 */
	public EditRoomDialog() {
		setBounds(100, 100, 821, 492);
		
		JPanel panel = new JPanel();
		getContentPane().add(panel, BorderLayout.NORTH);
		GridBagLayout gbl_panel = new GridBagLayout();
		gbl_panel.columnWidths = new int[]{0, 0, 0};
		gbl_panel.rowHeights = new int[]{0, 0, 0};
		gbl_panel.columnWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
		gbl_panel.rowWeights = new double[]{1.0, 1.0, Double.MIN_VALUE};
		panel.setLayout(gbl_panel);
		
		JPanel panel_1 = new JPanel();
		FlowLayout flowLayout = (FlowLayout) panel_1.getLayout();
		flowLayout.setAlignment(FlowLayout.LEFT);
		GridBagConstraints gbc_panel_1 = new GridBagConstraints();
		gbc_panel_1.weightx = 0.5;
		gbc_panel_1.insets = new Insets(0, 0, 5, 0);
		gbc_panel_1.fill = GridBagConstraints.BOTH;
		gbc_panel_1.gridx = 0;
		gbc_panel_1.gridy = 0;
		panel.add(panel_1, gbc_panel_1);
		
		JButton btnNewButton = new JButton("|<");
		btnNewButton.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("<");
		btnNewButton_1.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton_1);
		
		JButton btnNewButton_2 = new JButton(">");
		btnNewButton_2.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton_2);
		
		JButton btnNewButton_3 = new JButton(">|");
		btnNewButton_3.setPreferredSize(new Dimension(90, 25));
		panel_1.add(btnNewButton_3);
		
		JPanel panel_2 = new JPanel();
		FlowLayout flowLayout_1 = (FlowLayout) panel_2.getLayout();
		flowLayout_1.setAlignment(FlowLayout.RIGHT);
		GridBagConstraints gbc_panel_2 = new GridBagConstraints();
		gbc_panel_2.weightx = 0.5;
		gbc_panel_2.fill = GridBagConstraints.BOTH;
		gbc_panel_2.gridx = 1;
		gbc_panel_2.gridy = 0;
		panel.add(panel_2, gbc_panel_2);
		
		JButton btnNewButton_6 = new JButton("X\u00F3a");
		btnNewButton_6.setPreferredSize(new Dimension(90, 25));
		panel_2.add(btnNewButton_6);
		
		JButton btnNewButton_5 = new JButton("H\u1EE7y b\u1ECF");
		btnNewButton_5.setPreferredSize(new Dimension(90, 25));
		panel_2.add(btnNewButton_5);
		
		JButton btnNewButton_4 = new JButton("L\u01B0u l\u1EA1i");
		btnNewButton_4.setPreferredSize(new Dimension(90, 25));
		panel_2.add(btnNewButton_4);
		
		JPanel panel_3 = new JPanel();
		getContentPane().add(panel_3, BorderLayout.CENTER);
		GridBagLayout gbl_panel_3 = new GridBagLayout();
		gbl_panel_3.columnWidths = new int[]{0, 0, 118, 0, 0, 0, 0, 0};
		gbl_panel_3.rowHeights = new int[]{0, 0, 0, 0, 0, 233, 0};
		gbl_panel_3.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		gbl_panel_3.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		panel_3.setLayout(gbl_panel_3);
		
		Component rigidArea = Box.createRigidArea(new Dimension(20, 20));
		GridBagConstraints gbc_rigidArea = new GridBagConstraints();
		gbc_rigidArea.insets = new Insets(0, 0, 5, 5);
		gbc_rigidArea.gridx = 0;
		gbc_rigidArea.gridy = 0;
		panel_3.add(rigidArea, gbc_rigidArea);
		
		JLabel lblSPhng = new JLabel("S\u1ED1 ph\u00F2ng");
		GridBagConstraints gbc_lblSPhng = new GridBagConstraints();
		gbc_lblSPhng.anchor = GridBagConstraints.EAST;
		gbc_lblSPhng.insets = new Insets(0, 0, 5, 5);
		gbc_lblSPhng.gridx = 1;
		gbc_lblSPhng.gridy = 1;
		panel_3.add(lblSPhng, gbc_lblSPhng);
		
		textField = new JTextField();
		GridBagConstraints gbc_textField = new GridBagConstraints();
		gbc_textField.gridwidth = 2;
		gbc_textField.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField.insets = new Insets(0, 0, 5, 5);
		gbc_textField.gridx = 2;
		gbc_textField.gridy = 1;
		panel_3.add(textField, gbc_textField);
		textField.setColumns(20);
		
		Component horizontalStrut = Box.createHorizontalStrut(20);
		GridBagConstraints gbc_horizontalStrut = new GridBagConstraints();
		gbc_horizontalStrut.insets = new Insets(0, 0, 5, 5);
		gbc_horizontalStrut.gridx = 4;
		gbc_horizontalStrut.gridy = 1;
		panel_3.add(horizontalStrut, gbc_horizontalStrut);
		
		JLabel lblGhiCh = new JLabel("Ghi ch\u00FA");
		GridBagConstraints gbc_lblGhiCh = new GridBagConstraints();
		gbc_lblGhiCh.insets = new Insets(0, 0, 5, 5);
		gbc_lblGhiCh.gridx = 5;
		gbc_lblGhiCh.gridy = 1;
		panel_3.add(lblGhiCh, gbc_lblGhiCh);
		
		JTextArea textArea = new JTextArea();
		GridBagConstraints gbc_textArea = new GridBagConstraints();
		gbc_textArea.gridheight = 3;
		gbc_textArea.insets = new Insets(0, 0, 5, 10);
		gbc_textArea.fill = GridBagConstraints.BOTH;
		gbc_textArea.gridx = 6;
		gbc_textArea.gridy = 1;
		panel_3.add(textArea, gbc_textArea);
		
		JLabel lblTng = new JLabel("T\u1EA7ng");
		GridBagConstraints gbc_lblTng = new GridBagConstraints();
		gbc_lblTng.anchor = GridBagConstraints.EAST;
		gbc_lblTng.insets = new Insets(0, 0, 5, 5);
		gbc_lblTng.gridx = 1;
		gbc_lblTng.gridy = 2;
		panel_3.add(lblTng, gbc_lblTng);
		
		JComboBox comboBox = new JComboBox();
		GridBagConstraints gbc_comboBox = new GridBagConstraints();
		gbc_comboBox.gridwidth = 2;
		gbc_comboBox.insets = new Insets(0, 0, 5, 5);
		gbc_comboBox.fill = GridBagConstraints.HORIZONTAL;
		gbc_comboBox.gridx = 2;
		gbc_comboBox.gridy = 2;
		panel_3.add(comboBox, gbc_comboBox);
		
		JLabel lblScCha = new JLabel("S\u1EE9c ch\u1EE9a");
		GridBagConstraints gbc_lblScCha = new GridBagConstraints();
		gbc_lblScCha.anchor = GridBagConstraints.EAST;
		gbc_lblScCha.insets = new Insets(0, 0, 5, 5);
		gbc_lblScCha.gridx = 1;
		gbc_lblScCha.gridy = 3;
		panel_3.add(lblScCha, gbc_lblScCha);
		
		textField_1 = new JTextField();
		GridBagConstraints gbc_textField_1 = new GridBagConstraints();
		gbc_textField_1.insets = new Insets(0, 0, 5, 5);
		gbc_textField_1.fill = GridBagConstraints.HORIZONTAL;
		gbc_textField_1.gridx = 2;
		gbc_textField_1.gridy = 3;
		panel_3.add(textField_1, gbc_textField_1);
		textField_1.setColumns(10);
		
		JLabel lblNgi = new JLabel("ng\u01B0\u1EDDi");
		GridBagConstraints gbc_lblNgi = new GridBagConstraints();
		gbc_lblNgi.insets = new Insets(0, 0, 5, 5);
		gbc_lblNgi.anchor = GridBagConstraints.WEST;
		gbc_lblNgi.gridx = 3;
		gbc_lblNgi.gridy = 3;
		panel_3.add(lblNgi, gbc_lblNgi);
		
		Component verticalStrut = Box.createVerticalStrut(20);
		GridBagConstraints gbc_verticalStrut = new GridBagConstraints();
		gbc_verticalStrut.insets = new Insets(0, 0, 5, 5);
		gbc_verticalStrut.gridx = 1;
		gbc_verticalStrut.gridy = 4;
		panel_3.add(verticalStrut, gbc_verticalStrut);
		
		JScrollPane scrollPane = new JScrollPane();
		GridBagConstraints gbc_scrollPane = new GridBagConstraints();
		gbc_scrollPane.insets = new Insets(0, 0, 0, 10);
		gbc_scrollPane.gridwidth = 6;
		gbc_scrollPane.fill = GridBagConstraints.BOTH;
		gbc_scrollPane.gridx = 1;
		gbc_scrollPane.gridy = 5;
		panel_3.add(scrollPane, gbc_scrollPane);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null, null},
				{null, null, null, null, null},
				{null, null, null, null, null},
				{null, null, null, null, null},
				{null, null, null, null, null},
				{null, null, null, null, null},
				{null, null, null, null, null},
			},
			new String[] {
				"Kho\u1EA3ng th\u1EDDi gian", "Ng\u00E0y th\u01B0\u1EDDng", "Cu\u1ED1i tu\u1EA7n", "30/4", "Valentine day"
			}
		) {
			Class[] columnTypes = new Class[] {
				String.class, Object.class, Object.class, Object.class, Object.class
			};
			public Class getColumnClass(int columnIndex) {
				return columnTypes[columnIndex];
			}
		});

	}

}
